/*
 * @Author:
 * @Date: 2023-02-25 11:20:46
 * @LastEditors:
 * @LastEditTime: 2023-08-28 16:42:49
 * @FilePath: \immoka-admin\src\api\mokaCrystal\index.js
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name} , All Rights Reserved.
 */
import request from '@/utils/request';

// moka水晶列表
export function listData(query) {
  return request({
    url: `/admin/game/crystal`,
    method: 'get',
    params: query
  });
}

// 新增、编辑
export function addOrEdit(query) {
  return request({
    url: `/admin/game/crystal`,
    method: 'post',
    data: query
  });
}

// 更改状态
export function editStatus(query,id) {
  return request({
    url: `/admin/game/crystal/${id}/status`,
    method: 'put',
    data: query
  });
}

// 礼物信息
export function giftList(id) {
  return request({
    url: `/admin/game/crystal/gift/${id}`,
    method: 'get',
  });
}

// 数据分析
export function statistics(query) {
  return request({
    url: `/admin/game/crystal/statistics`,
    method: 'get',
    params: query
  });
}

// 用户数据记录
export function records(query) {
  return request({
    url: `/admin/game/crystal/user/records`,
    method: 'get',
    params: query
  });
}

// 期望和返奖率计算
export function calcData(query) {
  return request({
    url: `/admin/game/crystal/calc-data`,
    method: 'post',
    data: query
  });
}

// 横幅列表
export function banners(query) {
  return request({
    url: `/admin/game/crystal/banners`,
    method: 'get',
    params: query
  });
}

// 新增/编辑横幅
export function editOrAddBanners(query) {
  return request({
    url: `/admin/game/crystal/banners`,
    method: 'post',
    data: query
  });
}

// 更改横幅状态
export function updateBannersStatus(query,id) {
  return request({
    url: `/admin/game/crystal/banners/${id}/status`,
    method: 'put',
    data: query
  });
}

// 横幅删除
export function delBanners(id) {
  return request({
    url: `/admin/game/crystal/banners/${id}`,
    method: 'delete'
  });
}

// 设置
export function lotteryCritSetting(query) {
  return request({
    url: `/admin/game/lottery-crit/setting`,
    method: 'get',
    params: query
  });
}
// 编辑设置
export function postLotteryCritSetting(query) {
  return request({
    url: `/admin/game/lottery-crit/setting`,
    method: 'post',
    data: query
  });
}
